clear
set more off

cap log close
log using $logdir/ppp_reg.log, replace

use $fromsasdir/result if num_emp > 0 & wg_amt/num_emp > 20

gen any_ppp = !missing(ppp_first_ym)
gen any_ertc = ertc > 0
gen any_amend = ertc_amendment > 0

destring naics6 zip, replace force

reghdfe any_ertc any_ppp if inrange(tp,202103,202109), ///
	a(bin#zip#naics6#tp) vce(robust)
reghdfe any_amend any_ppp if tp <= 202106, a(bin#zip#naics6#tp) vce(robust)

cap log close
